Class Sound#setSoundOut
Sound
- Defined in: sound.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Sound#setSoundOut(successCallback, errorCallback, options)
Sets Sound speakerType.
|
Class Detail
Sound#setSoundOut(successCallback, errorCallback, options)
Sets Sound speakerType. Each SoundOut has a set of predefined sound properties. And each sound speakerTypes can be changed with setSoundOut().
// Javascript code
function setSoundOut () {
var options = {
speakerType : Sound.SpeakerType.SignageSpeaker
};
function successCb() {
// Do something
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var sound = new Sound();
sound.setSoundOut(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required speakerType String SoundOut required
- Since:
- 1.4
- Returns:
If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with a failure callback object as a parameter.
- See:
- Sound.getSoundOut()